﻿@*@model TJBHJJ.Models.Home*@
@{
    TJBHJJ.Models.Home home = new TJBHJJ.Models.Home();
    int productsindex = 10;
    if (!int.TryParse(System.Configuration.ConfigurationManager.AppSettings["ProductsIndex"], out productsindex))
    {
        productsindex = 5;
    }
}
<ul class="leftul">
    @foreach (var v in home.Products.Take(productsindex))
    {
        if (v != null)
        {
        <li>@Html.ActionLink(v.Name.Length > 13 ? v.Name.Substring(0, 13) + "..." : v.Name, "Detail", "Products", new { page = 0, id = v.Id }, new { })</li>
        }
    }
</ul>
